Intra prediction has been widely adopted in various image and video coding standard to process an initial picture or to periodically insert I-picture or I-blocks for random access or for alleviation of error propagation. Intra prediction is usually designed to exploit spatial features in the picture such as smooth area, vertical line or edge, horizontal line or edge, and diagonal line or edge. Intra prediction is also useful for regions with high motion or scene changes. Intra prediction exploits the spatial correlation within a picture or within a picture region. For a block-based video coding standard, intra prediction for a current block is relied upon pixels in neighboring blocks that have been processed. For example, if blocks in a picture or picture region are sequentially processed row by row from top to bottom and from left to right, neighboring blocks on the top and neighboring blocks on the left of the current block can be used to form an intra predictor for pixels in the current block.
The High-Efficiency Video Coding (HEVC) standard supports 35 intra prediction modes including 33 angular modes, DC mode and Planar mode. FIG. 1 illustrates the prediction directions for the 33 angular intra prediction modes of the HEVC standard, where H represents Horizontal direction mode and V represents Vertical direction mode. An intra predictor for a current block coded or to be coded by intra prediction of HEVC is generated by three steps including intra smoothing filter, intra prediction and intra gradient filter. FIG. 2 illustrates exemplary reference samples filtered by an intra smoothing filter for deriving an intra predictor for a current block. A smoothing operation is applied to reference samples 22 of the current block 20 before calculating the intra predictor for the current block 20. The smoothing operation reduces the discontinuities introduced by some of the intra prediction modes by applying the intra smoothing filter to the reference samples 22 in a left neighboring column and an above neighboring row of the current block 20. This smoothing operation is adaptively applied depending on an intra prediction mode and the size of the current block.
The second step is to derive the intra predictor from neighboring reference samples according to one intra prediction mode selected from the 35 intra prediction modes. If an angular mode is selected, the value of each sample in the current block is predicted by extrapolating the samples from the reference samples according to the prediction direction of the selected angular mode. The value of each sample in the current block is calculated assuming an amplitude surface with a horizontal and vertical smooth gradient derived from the boundaries samples of the neighboring blocks if Planar mode is selected. The value of each samples of the current block is an average of the reference samples if DC mode is selected.
An intra gradient filter is applied to samples at the left and top boundaries of the current block in the third step if the intra prediction mode is DC, Horizontal, or Vertical mode. The concept of applying the intra gradient filter is to utilize the gradient information along the intra prediction direction to improve the quality of the intra predictor. The samples in the first row and first column of the current block are filtered by the intra gradient filter when the selected intra prediction mode is DC mode. The samples in the first row are filtered by the intra gradient filter when the selected intra prediction mode is Horizontal mode, and the samples in the first column are filtered by the intra gradient filter if the selected intra prediction mode is Vertical mode.
The selected intra prediction mode is signaled explicitly or inferred from previously decoded modes of the above and left neighboring blocks of the current block. The intra prediction modes of the two neighboring blocks are included in a set of three Most Probable Modes (MPMs). A first MPM flag is signaled to indicate whether the selected mode is identical to one of the three MPMs, if so, another flag is sent to indicate which of the three MPMs is selected; if the first MPM flag is false, the selected mode is explicitly signaled using a 5-bit fixed length codeword.
The 33 angular modes shown in FIG. 1 can be expanded to a general case with more or less angular modes, where each of the angular modes can be represented by mode H+k or mode V+k, where H represents the direction of Horizontal mode, V represents the direction of Vertical mode, and k=0, +−1, +−2, . . . +−K. An example of 65 angular modes for intra prediction is shown in FIG. 3, where k is ranged from −16 to 16, and mode H−16 and mode V−16 are the same mode as this mode refers to the prediction direction from an upper-left corner to the center of the current block. FIG. 3 illustrates the 65 angular intra prediction modes with additional 32 angular modes in between the original 33 angular modes of HEVC. The 65 angular modes in FIG. 3 include modes H+16 to H−15 from bottom to top at the left boundary of the block and modes V−16 to V+16 from left to right at the upper boundary of the block.
A partitioning structure called Quad-Tree-Binary-Tree (QTBT) structure combines a quadtree structure with a binary tree structure, which balances the coding efficiency and the coding complexity. An exemplary QTBT structure is shown in FIG. 4A, where a large block is firstly partitioned by a quadtree structure then a binary tree structure. FIG. 4A illustrates an example of block partitioning according to the QTBT structure and FIG. 4B illustrates a tree diagram for the QTBT structure corresponding to the block partitioning shown in FIG. 4A. The solid lines in FIGS. 4A and 4B indicate quadtree splitting while the dotted lines indicate binary tree splitting. In each splitting (i.e., non-leaf) node of the binary tree structure, one flag indicates which splitting type (symmetric horizontal splitting or symmetric vertical splitting) is used, 0 indicates horizontal splitting and 1 indicates vertical splitting. The QTBT structure splits the large block in FIG. 4A into multiple smaller blocks, and these smaller blocks may be processed by prediction and transform coding without further splitting. In an example, the large block in FIG. 4A is a coding tree unit (CTU) with a size of 128×128, a minimum allowed quadtree leaf node size is 16×16, a maximum allowed binary tree root node size is 64×64, a minimum allowed binary tree leaf node width or height is 4, and a minimum allowed binary tree depth is 4. In this example, the leaf quadtree block may have a size from 16×16 to 128×128, and if the leaf quadtree block is 128×128, it cannot be further split by the binary tree structure since the size exceeds the maximum allowed binary tree root node size 64×64. The leaf quadtree block is used as the root binary tree block that has a binary tree depth equal to 0. When the binary tree depth reaches 4, non-splitting is implicit; when the binary tree node has a width equal to 4, non-vertical splitting is implicit; and when the binary tree node has a height equal to 4, non-horizontal splitting is implicit.
For CTUs coded in I slice, the QTBT block partitioning for a chroma coding tree block (CTB) can be different from the QTBT block partitioning for a corresponding luma CTB. Different chroma samples within the chroma coding unit (CU) may correspond to different luma CUs, so when a chroma CU is coded in Intra direct mode (DM), an upper left chroma pixel of the chroma CU is used to locate a corresponding luma pixel, and the intra prediction mode of the corresponding luma pixel will be selected as the intra prediction mode for the chroma CU.